{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "Boostmonoculardepth.ipynb",
      "provenance": [],
      "collapsed_sections": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Vy3Sy5fxAApC"
      },
      "source": [
        "##Put your sample images in /content/inputs folder\n",
        "\n",
        "##Results will be generated in /content/outputs folder"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "gUvYYzbz-D9k"
      },
      "source": [
        "!mkdir -p inputs\n",
        "!mkdir -p outputs\n",
        "\n",
        "# Clone git repo\n",
        "!git clone https://github.com/compphoto/BoostingMonocularDepth.git\n",
        "\n",
        "# !wget https://sfu.ca/~yagiz/CVPR21/latest_net_G.pth\n",
        "!gdown https://drive.google.com/u/0/uc?id=1cU2y-kMbt0Sf00Ns4CN2oO9qPJ8BensP&export=download\n",
        "\n",
        "# Downloading merge model weights\n",
        "!mkdir -p /content/BoostingMonocularDepth/pix2pix/checkpoints/mergemodel/\n",
        "!mv latest_net_G.pth /content/BoostingMonocularDepth/pix2pix/checkpoints/mergemodel/\n",
        "\n",
        "# Downloading Midas weights\n",
        "!gdown https://drive.google.com/uc?id=1nqW_Hwj86kslfsXR7EnXpEWdO2csz1cC\n",
        "!mv model.pt /content/BoostingMonocularDepth/midas/"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ZzcDgJfc9zrW"
      },
      "source": [
        "# Running the method\n",
        "%cd BoostingMonocularDepth/\n",
        "!python run.py --Final --data_dir /content/inputs --output_dir  /content/outputs/ --depthNet 0"
      ],
      "execution_count": null,
      "outputs": []
    }
  ]
}